
package com.zsrt.day0523.jdbc.ch01.impl;



import org.junit.Test;

import com.zsrt.day0523.jdbc.ch01.dao.EmployeeDao;
import com.zsrt.day0523.jdbc.ch01.dao.Factory;


public class EmployeeTest {

	@Test
	public void test01() throws Exception {
		Factory factory = new FactoryImpl();
		
		int type = 3306;
		EmployeeDao dao = factory.inistance(type);
		
		String str = "insert into user_t values(1002,'jmj',123456)";
		int result = dao.add(str );
		
		System.out.println(result);
	}
	
	@Test
	public void deleTest() throws Exception {
		Factory factory = new FactoryImpl();
		
		int type = 1521;
		EmployeeDao dao = factory.inistance(type);
		
		String str = "update user_t set is_delete=1 where id='1001'";
		int result = dao.delete(str);
		
		System.out.println(result);
	}
}
